package com.myh.springcloud.service;

import java.util.List;

import org.springframework.stereotype.Component;

import com.myh.springcloud.pojo.User;

import feign.hystrix.FallbackFactory;

/*
**2020年7月15日--上午9:44:51
**@version:
**莫耀华:
**@Description:
*/
@Component
public class IUSerServiceFallBackfactory implements FallbackFactory<IUSerService>{

	@Override
	public IUSerService create(Throwable cause) {
		return new IUSerService() {

			@Override
			public User queryById(Long id) {
				// TODO Auto-generated method stub
				return new User(1L, "失败", "服务被关闭", "服务不可用", "服务被关闭");
			}

			@Override
			public List<User> quertAll() {
				// TODO Auto-generated method stub
				return null;
			}

			@Override
			public boolean addUser(User user) {
				// TODO Auto-generated method stub
				return false;
			}
			
		};
	}
}
